package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "quotationdetails_", schema = "boot", catalog = "")
public class Quotationdetails {//报价明细表
    private int quotationdId;//明细id
    private Integer quotationdNum;//数量
    private BigDecimal quotationdPrice;//单价
    private BigDecimal quotationdMoney;//金额
    private String quotationdMan;//所有人
    private Date quotationdDate;//创建时间
    private Quotation quotation;//报价单id
    private Productt productt;//产品id

    @Id
    @Column(name = "Quotationd_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getQuotationdId() {
        return quotationdId;
    }

    public void setQuotationdId(int quotationdId) {
        this.quotationdId = quotationdId;
    }

    @Basic
    @Column(name = "Quotationd_num", nullable = true)
    public Integer getQuotationdNum() {
        return quotationdNum;
    }

    public void setQuotationdNum(Integer quotationdNum) {
        this.quotationdNum = quotationdNum;
    }

    @Basic
    @Column(name = "Quotationd_price", nullable = true, precision = 2)
    public BigDecimal getQuotationdPrice() {
        return quotationdPrice;
    }

    public void setQuotationdPrice(BigDecimal quotationdPrice) {
        this.quotationdPrice = quotationdPrice;
    }

    @Basic
    @Column(name = "Quotationd_money", nullable = true, precision = 2)
    public BigDecimal getQuotationdMoney() {
        return quotationdMoney;
    }

    public void setQuotationdMoney(BigDecimal quotationdMoney) {
        this.quotationdMoney = quotationdMoney;
    }

    @Basic
    @Column(name = "Quotationd_man", nullable = true, length = 200)
    public String getQuotationdMan() {
        return quotationdMan;
    }

    public void setQuotationdMan(String quotationdMan) {
        this.quotationdMan = quotationdMan;
    }

    @Basic
    @Column(name = "Quotationd_date", nullable = true)
    public Date getQuotationdDate() {
        return quotationdDate;
    }

    public void setQuotationdDate(Date quotationdDate) {
        this.quotationdDate = quotationdDate;
    }

    @ManyToOne
    @JoinColumn(name = "Quotation_Id", referencedColumnName = "Quotation_Id")
    public Quotation getQuotation() {
        return quotation;
    }

    public void setQuotation(Quotation quotation) {
        this.quotation = quotation;
    }

    @ManyToOne
    @JoinColumn(name = "productt_id", referencedColumnName = "productt_id")
    public Productt getProductt() {
        return productt;
    }

    public void setProductt(Productt productt) {
        this.productt = productt;
    }
}
